﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StuMgr.aspx.cs" Inherits="InformationSystem.WebSite.Module.StuMgr.StuMgr" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script type="text/javascript">
        function callback() {
            parent.ResizeFrameHeight(TreePanel1.getHeight());
            //parent.ResizeFrameHeight(ViewPort1.getHeight(500));
        }
    </script>
</head>
<body>
    <ext:ResourceManager ID="ResourceManager1" runat="server">
        <Listeners>
            <DocumentReady Fn="callback()" />
        </Listeners>
    </ext:ResourceManager>
    <table id="stuT" style="vertical-align: baseline">
        <tr>
            <td>
                <ext:TreePanel ID="TreePanel1" runat="server" Width="150" Height="450" Icon="BookOpen"
                    Title="班级列表" AutoScroll="true" TitleCollapse="false">
                    <DirectEvents>
                        <Click OnEvent="NodeClick" Before=" if (node.id == 'class') return  false; return true;">
                            <ExtraParams>
                                <ext:Parameter Name="cid" Value="node.id" Mode="Raw">
                                </ext:Parameter>
                            </ExtraParams>
                        </Click>
                    </DirectEvents>
                    <BottomBar>
                        <ext:StatusBar ID="StatusBar1" runat="server" AutoClear="1500" />
                    </BottomBar>
                </ext:TreePanel>
            </td>
            <td>
                <ext:GridPanel ID="GridPanel1" runat="server" StripeRows="true" Title="学生列表" Width="300"
                    Height="450">
                    <Store>
                        <ext:Store ID="StuStore" runat="server">
                            <Reader>
                                <ext:ArrayReader>
                                    <Fields>
                                        <ext:RecordField Name="ID" Mapping="UserID" />
                                        <ext:RecordField Name="Name" Mapping="UserName" />
                                        <ext:RecordField Name="Major" Mapping="MarjorName" />
                                    </Fields>
                                </ext:ArrayReader>
                            </Reader>
                        </ext:Store>
                    </Store>
                    <DirectEvents>
                        <RowClick OnEvent="GridViewClick">
                            <ExtraParams>
                                <ext:Parameter Name="sid" Value="#{GridPanel1}.getSelectionModel().getSelected().data.ID"
                                    Mode="Raw">
                                </ext:Parameter>
                            </ExtraParams>
                        </RowClick>
                    </DirectEvents>
                    <ColumnModel ID="ColumnModel1" runat="server">
                        <Columns>
                            <ext:Column Header="学号" Width="80" DataIndex="ID">
                            </ext:Column>
                            <ext:Column Header="姓名" Width="80" DataIndex="Name">
                            </ext:Column>
                            <ext:Column Header="专业" Width="110" DataIndex="Major" />
                        </Columns>
                    </ColumnModel>
                    <SelectionModel>
                        <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true">
                        </ext:RowSelectionModel>
                    </SelectionModel>
                    <LoadMask ShowMask="true" />
                </ext:GridPanel>
            </td>
            <td>
                <ext:Panel ID="Panel3" runat="server" Title="Width=1" Header="false" Height="450">
                    <Items>
                        <ext:TabPanel ID="TabPanel1" runat="server" ActiveTabIndex="0" Width="200" Height="450"
                            Plain="true">
                            <Items>
                                <ext:FormPanel ID="FormPanel1" runat="server" Title="基本信息" Height="180" Padding="20"
                                    LabelWidth="40">
                                    <Items>
                                        <ext:Label ID="College" runat="server" FieldLabel="学院" Height="20" Width="60" />
                                        <ext:Label ID="Grade" runat="server" FieldLabel="年级" Height="20" Width="60" />
                                        <ext:Label ID="Major" runat="server" FieldLabel="专业" Height="20" Width="60" />
                                        <ext:Label ID="Class" runat="server" FieldLabel="班级" Height="20" Width="60" />
                                        <ext:Label ID="ID" runat="server" FieldLabel="学号" Height="20" Width="60" />
                                        <ext:Label ID="Name" runat="server" FieldLabel="姓名" Height="20" Width="60" />
                                    </Items>
                                </ext:FormPanel>
                                <ext:GridPanel ID="GridPanel2" runat="server" StripeRows="true" Title="成绩" Width="300"
                                    Height="450">
                                    <Store>
                                        <ext:Store ID="StuMarkStore" runat="server" GroupField="coursesessiondescp" RemoteSort="true">
                                            <Reader>
                                                <ext:ArrayReader>
                                                    <Fields>
                                                        <ext:RecordField Name="coursesessiondescp" Mapping="CourseSessionDescp" Type="String" />
                                                        <ext:RecordField Name="courseid" Mapping="CourseID" />
                                                        <ext:RecordField Name="coursename" Mapping="CourseName" />
                                                        <ext:RecordField Name="markstring" Mapping="MarkString" />
                                                    </Fields>
                                                </ext:ArrayReader>
                                            </Reader>
                                        </ext:Store>
                                    </Store>
                                    <ColumnModel ID="ColumnModel2" runat="server">
                                        <Columns>
                                            <ext:Column DataIndex="coursesessiondescp" />
                                            <ext:Column Header="课程编号" Width="80" DataIndex="courseid" Hidden="true">
                                            </ext:Column>
                                            <ext:Column Header="课程" Width="130" DataIndex="coursename">
                                            </ext:Column>
                                            <ext:Column Header="成绩" Width="50" DataIndex="markstring">
                                            </ext:Column>
                                        </Columns>
                                    </ColumnModel>
                                    <LoadMask ShowMask="true" />
                                    <View>
                                        <ext:GroupingView ID="GroupingView1" runat="server" ForceFit="true" MarkDirty="false"
                                            ShowGroupName="false" EnableNoGroups="true" HideGroupedColumn="true">
                                        </ext:GroupingView>
                                    </View>
                                </ext:GridPanel>
                            </Items>
                        </ext:TabPanel>
                    </Items>
                </ext:Panel>
            </td>
        </tr>
    </table>
</body>
</html>
